1. Field of the Invention
The present invention relates to distance measuring method and device for measuring a distance to a subject using a modulated-light phase-difference technique, or a TOF (time of flight) technique.
2. Description of the Related Art
Distance measuring devices using a modulated-light phase-difference technique, or a TOF (time of flight) technique, for measuring a distance to a subject has conventionally been known (see, for example, U.S. Pat. Nos. 7,138,646 and 5,856,667). In the TOF technique, a distance to a subject is measured by illuminating the subject with intensity-modulated light, receiving reflected modulated light from the subject, and detecting a phase difference between the modulated light and the reflected modulated light. In the technique disclosed in the above patents, measurement values are obtained at different phases by sampling amounts of light of the reflected modulated light when the phase of the modulated light is 0°, 90°, 180° and 270°. Then, distance information to the subject to be detected is calculated based on the four types of measurement values obtained at different phases.
In the technique disclosed in the above patents, however, if external light enters the light receiving section when each detection signal is detected, the obtained detection signal represents not only the amount of the reflected modulated light, and this results in erroneous distance calculation. Further, when the four types of detection signals are obtained using multiple pixels, the pixels may receive reflected modulated light which is reflected from different positions on the subject to be measured, and this also results in erroneous distance calculation.